#! /bin/sh
#set -x

WIDTH=600
HEIGHT=600
XOFF1=0
YOFF1=0
XOFF2=650
YOFF2=650

cd model.dir

make 

demo=01

nt=101 dt=1.0 ft=0.0 dtsegy=1000000
nx=101 dx=1.0  fx=0.0
nz=101 dz=1.0  fz=0.0

# make velocity function
makevel >junkv \
	nx=$nx dx=$dx fx=$fx nz=$nz dz=$dz fz=$fz \
	v000=2.0 dvdx=0.0 dvdz=0.0


# make synthetic data
../model.dir/makesyn >junks nx=$nx dx=$dx fx=$fx nt=$nt dt=$dt ft=$ft
suaddhead <junks ns=$nt |
sushw key=dt a=$dtsegy |
sushw key=d2 a=$dx |
sushw key=f2 a=$fx >junks.su

mv junkv ../miggbzo.dir
mv junks.su ../miggbzo.dir

cd ../miggbzo.dir

# plot the Background velocity profile --- constant 2.0 for Demo01
ximage <junkv  \
	wbox=$WIDTH hbox=$HEIGHT xbox=$XOFF1 ybox=$YOFF1 \
	n1=$nz d1=$dz f1=$fz n2=$nx d2=$dx f2=$fx \
	label1="Depth (samples)" label2="Distance (samples)" \
	title="Constant Background Velocity "  & 

# plot synthetic data
suximage <junks.su clip=.05  \
	wbox=$WIDTH hbox=$HEIGHT xbox=$XOFF2 ybox=$YOFF1 \
	label1="Time (samples)" label2="Distance (samples)" \
	title="Input data"  &

exit

